#pragma once
#include"RBTree.h"
namespace zjs {
	template <class K>
	class set {
	public:
		struct SetOfKey
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};

		typedef typename RBTree<K, SetOfKey>::const_iterator iterator;
		typedef typename RBTree<K, SetOfKey>::const_iterator const_iterator;
		iterator begin() const
		{
			return _t.Begin();
		}

		iterator end() const
		{
			return _t.End();
		}

		pair<iterator, bool> insert(const K& data)
		{
			return _t.Insert(data);
		}
		void InOrder()
		{
			_t.InOrder();
		}
	private:
		RBTree<K, SetOfKey>_t;
	};
}